home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / latexsty3 / SPEC11 / sty
Encoding:
Text File  |  1991-02-10  |  15.4 KB  |  360 lines

  1. % SPECIFICATION DOCUMENT STYLE V0.1 -- Released 22 December 1988
  2. % based on 
  3. % ARTICLE DOCUMENT STYLE -- Released 4 September 1986
  4. %    for LaTeX version 2.09
  5. % Copyright (C) 1986 by Leslie Lamport
  6.  
  7. %  ****************************************
  8. %  *               FONTS                  *
  9. %  ****************************************
  10. %
  11.  
  12. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  13. \normallineskip 1pt
  14. \def\baselinestretch{1}
  15.  
  16. % Each size-changing command \SIZE executes the command
  17. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  18. % where:
  19. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  20. %                  value will be \baselinestretch * BASELINESKIP.)
  21. %
  22. %  \FONTSIZE     = Name of font-size command.  The currently available
  23. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  24. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  25. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  26. %  \@FONTSIZE    = The same as the font-size command except with an
  27. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  28. %                  \@FONTSIZE = \@xivpt.
  29. %
  30. % For reasons of efficiency that needn't concern the designer,
  31. % the document style defines \@normalsize instead of \normalsize .  This is
  32. % done only for \normalsize, not for any other size-changing commands.
  33.  
  34. \def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
  35. \abovedisplayskip 11pt plus3pt minus6pt%
  36. \belowdisplayskip \abovedisplayskip
  37. \abovedisplayshortskip  \z@ plus3pt%   
  38. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt}
  39.  
  40. \def\small{\@setsize\small{12pt}\xpt\@xpt
  41. \abovedisplayskip 10pt plus2pt minus5pt%
  42. \belowdisplayskip \abovedisplayskip
  43. \abovedisplayshortskip  \z@ plus3pt%   
  44. \belowdisplayshortskip  6pt plus3pt minus3pt
  45. \def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  46. \itemsep \parsep}}
  47.  
  48. \def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
  49. \abovedisplayskip 8pt plus 2pt minus 4pt%
  50. \belowdisplayskip \abovedisplayskip
  51. \abovedisplayshortskip \z@ plus 1pt%
  52. \belowdisplayshortskip 4pt plus 2pt minus 2pt
  53. \def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  54. \itemsep \parsep}}
  55.  
  56. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  57. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  58. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  59. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  60. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  61. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  62. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  63.  
  64. \normalsize  % Choose the normalsize font.
  65.  
  66.  
  67. %  ****************************************
  68. %  *            PAGE LAYOUT               *
  69. %  ****************************************
  70. %
  71. % All margin dimensions measured from a point one inch from top and side
  72. % of page.  
  73.  
  74. % SIDE MARGINS:
  75. \if@twoside                 % Values for two-sided printing:
  76.    \oddsidemargin 36pt      %   Left margin on odd-numbered pages.
  77.    \evensidemargin 74pt     %   Left margin on even-numbered pages.
  78.    \marginparwidth 100pt    %   Width of marginal notes.
  79. \else                       % Values for one-sided printing:
  80.    \oddsidemargin 54pt      %   Note that \oddsidemargin = \evensidemargin
  81.    \evensidemargin 54pt
  82.    \marginparwidth 83pt 
  83. \fi
  84. \marginparsep 10pt          % Horizontal space between outer margin and 
  85.                             % marginal note
  86.  
  87.  
  88. % VERTICAL SPACING:        
  89.                          % Top of page:
  90. \topmargin 18pt          %    Nominal distance from top of page to top of 
  91. \headheight 42pt         %    Height of box containing running head. %spec%
  92. \headsep 25pt            %    Space between running head and text.
  93. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  94.                          % Bottom of page:
  95. \footskip 30pt           %    Distance from baseline of box containing foot 
  96.                          %    to baseline of last line of text.
  97.  
  98. % DIMENSION OF TEXT:
  99. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  100. % The value of the multiplier was calculated as the floor of the
  101. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  102. % The old value of \textheight was 530.4pt.
  103. % \textheight is the height of text (including footnotes and figures, 
  104. % excluding running head and foot).
  105.  
  106. \textheight = 38\baselineskip
  107. \advance\textheight by \topskip
  108. \textwidth 360pt         % Width of text line.
  109.                          % For two-column mode: 
  110. \columnsep 10pt          %    Space between columns 
  111. \columnseprule 0pt       %    Width of rule between columns.
  112.  
  113. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  114. % natural height instead of being stretched to exactly \textheight.
  115.  
  116. % FOOTNOTES:
  117.  
  118. \footnotesep 7.7pt    % Height of strut placed at the beginning of every
  119.                       % footnote = height of normal \footnotesize strut,
  120.                       % so no extra space between footnotes.
  121.  
  122. \skip\footins 10pt plus 4pt minus 2pt  % Space between last line of text and 
  123.                                        % top of first footnote.
  124.  
  125. % FLOATS: (a float is something like a figure or table)
  126. %
  127. %  FOR FLOATS ON A TEXT PAGE:
  128. %
  129. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  130. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  131.                                          % to top or bottom of text page.
  132. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  133.                                          % at top or bottom of page.
  134. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and 
  135.                                          % text.
  136. \@maxsep 20pt                            % The maximum of \floatsep, 
  137.                                          % \textfloatsep and \intextsep (minus
  138.                                          % the stretch and shrink).
  139. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  140. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  141.                                          % figures in two-column mode.
  142. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  143.                                          % floats.
  144. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  145.                                          % \dbltexfloatsep.
  146.  
  147. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  148. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  149. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  150.                          % 0pt plus ...)                                    
  151. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.       
  152. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  153.                          % 0pt plus ... )                                   
  154.  
  155. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  156. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  157. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  158. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  159.                          % 0pt plus ... )                                   
  160. % MARGINAL NOTES:
  161. %
  162. \marginparpush 5pt       % Minimum vertical separation between two marginal 
  163.                          % notes.
  164.  
  165.  
  166. %  ****************************************
  167. %  *           PARAGRAPHING               *
  168. %  ****************************************
  169. %
  170. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  171. \parindent 17pt                    % Width of paragraph indentation.
  172. \topsep 9pt plus 3pt minus 5pt     % Extra vertical space, in addition to 
  173.                                    % \parskip, added above and below list and
  174.                                    % paragraphing environments.
  175. \partopsep 3pt plus 1pt minus 2pt  % Extra vertical space, in addition to 
  176.                                    % \parskip and \topsep, added when user
  177.                                    % leaves blank line before environment.
  178. \itemsep 4.5pt plus 2pt minus 1pt  % Extra vertical space, in addition to
  179.                                    % \parskip, added between list items.
  180.  
  181. % The following page-breaking penalties are defined
  182.  
  183. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  184. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  185. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  186.  
  187. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  188. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  189. \@itempenalty     -\@lowpenalty    % Between list items.
  190.  
  191. % \clubpenalty         % 'Club line'  at bottom of page.
  192. % \widowpenalty        % 'Widow line' at top of page.
  193. % \displaywidowpenalty % Math display widow line.
  194. % \predisplaypenalty   % Breaking before a math display.
  195. % \postdisplaypenalty  % Breaking after a math display.
  196. % \interlinepenalty    % Breaking at a line within a paragraph.
  197. % \brokenpenalty       % Breaking after a hyphenated line.
  198.  
  199.  
  200. %    ****************************************
  201. %    *             SECTIONS                 *
  202. %    ****************************************
  203. %
  204.  
  205. % \secdef{UNSTARCMDS}{STARCMDS} :
  206. %    When defining a sectionioning command without using
  207. %    \@startsection, you can use \secdef as follows:
  208. %       \def\part { ... \secdef \CMDA \CMDB }
  209. %       \def\CMDA  [#1]#2{ ... }     % Command to define \part[...]{...}
  210. %       \def\CMDB  #1{ ... }         % Command to define \part*{...}
  211.  
  212. \def\part{\par               % New paragraph
  213.    \addvspace{4ex}           % Adds vertical space above title.
  214.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  215.    \secdef\@part\@spart}     % to \@afterindenttrue to have indent.
  216.  
  217. \def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1
  218.         \refstepcounter{part}                    %  THEN step part counter
  219.         \addcontentsline{toc}{part}{\thepart     %       add toc line
  220.         \hspace{1em}#1}\else                     %  ELSE add unnumbered line
  221.       \addcontentsline{toc}{part}{#1}\fi         % FI
  222.    { \parindent 0pt \raggedright 
  223.     \ifnum \c@secnumdepth >\m@ne   % IF secnumdepth > -1 
  224.       \Large \bf Part \thepart     %   THEN Print 'Part' and 
  225.       \par\nobreak                 %          number in \Large boldface.
  226.     \fi                            % FI
  227.     \huge \bf                      % Select \huge boldface.
  228.     #2\markboth{}{}\par }          % Print title and set heading marks null.
  229.     \nobreak                       % TeX penalty to prevent page break.
  230.     \vskip 3ex                     % Space between title and text.
  231.    \@afterheading                  % Routine called after part and
  232.     }                              %     section heading.
  233.  
  234. % Heading for \part* command
  235. \def\@spart#1{{\parindent 0pt \raggedright 
  236.     \huge \bf                       
  237.     #1\par}                         % Title.
  238.     \nobreak                        % TeX penalty to prevent page break.
  239.     \vskip 3ex                      % Space between title and text.
  240.     \@afterheading                  % Routine called after part and
  241.   }                                 %     section heading.
  242.  
  243. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  244. %            optional * [ALTHEADING]{HEADING}
  245. %    Generic command to start a section.  
  246. %    NAME       : e.g., 'subsection'
  247. %    LEVEL      : a number, denoting depth of section -- i.e., section=1,
  248. %                 subsection = 2, etc.  A section number will be printed if
  249. %                 and only if LEVEL < or = the value of the secnumdepth
  250. %                 counter.
  251. %    INDENT     : Indentation of heading from left margin
  252. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  253. %                 If negative, then paragraph indent of text following 
  254. %                 heading is suppressed.
  255. %    AFTERSKIP  : if positive, then skip to leave below heading,
  256. %                       else - skip to leave to right of run-in heading.
  257. %    STYLE      : commands to set style
  258. %  If '*' missing, then increments the counter.  If it is present, then
  259. %  there should be no [ALTHEADING] argument.  A sectioning command
  260. %  is normally defined to \@startsection + its first six arguments.
  261.  
  262. \def\section{\cleardoublepage % Starts new right-hand page.
  263.    \global\@topnum\z@        % Prevents figures from going at top of page.
  264.    \@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  265.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  266. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  267.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  268. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus 
  269.  -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  270. \def\paragraph{\@startsection
  271.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  272. \def\subparagraph{\@startsection
  273.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  274.      .2ex}{-1em}{\normalsize\bf}}
  275.  
  276.  
  277. % Default initializations of \...mark commands.  (See below for their
  278. % us in defining page styles.
  279. %
  280.  
  281. % \def\sectionmark#1{}           % Preloaded definitions
  282. % \def\subsectionmark#1{}
  283. % \def\subsubsectionmark#1{}
  284. % \def\paragraphmark#1{}
  285. % \def\subparagraphmark#1{}
  286.  
  287. % The value of the counter secnumdepth gives the depth of the
  288. % highest-level sectioning command that is to produce section numbers.
  289. %
  290.  
  291. \setcounter{secnumdepth}{3}
  292.  
  293. % APPENDIX
  294. %
  295. % The \appendix command must do the following:
  296. %    -- reset the section and subsection counters to zero
  297. %    -- redefine the section counter to produce appendix numbers
  298. %    -- redefine the \section command if appendix titles and headings are
  299. %       to look different from section titles and headings.
  300.  
  301. \def\appendix{\par
  302.   \setcounter{section}{0}
  303.   \setcounter{subsection}{0}
  304.   \def\@chapapp{Appendix}
  305.   \def\thesection{\Alph{section}}}
  306.  
  307.  
  308. %    ****************************************
  309. %    *                LISTS                 *
  310. %    ****************************************
  311. %
  312.  
  313. % The following commands are used to set the default values for the list
  314. % environment's parameters. See the LaTeX manual for an explanation of
  315. % the meanings of the parameters.  Defaults for the list environment are
  316. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  317. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  318. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  319. % called for a third-level list.)  By convention, \@listK should set
  320. % \leftmargin to \leftmarginK.
  321. %
  322. % For efficiency, level-one list's values are defined at top level, and
  323. % \@listi is defined to set only \leftmargin.
  324.  
  325. \leftmargini 2.5em
  326. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  327. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  328. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  329. \leftmarginv 1em
  330. \leftmarginvi 1em
  331.  
  332. \leftmargin\leftmargini
  333. \labelsep .5em
  334. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  335. \parsep 4.5pt plus 2pt minus 1pt
  336.  
  337. \def\@listi{\leftmargin\leftmargini}
  338.  
  339. \def\@listii{\leftmargin\leftmarginii
  340.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  341.    \topsep 4.5pt plus 2pt minus 1pt
  342.    \parsep 2pt plus 1pt minus 1pt
  343.    \itemsep \parsep}
  344.  
  345. \def\@listiii{\leftmargin\leftmarginiii
  346.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  347.     \topsep 2pt plus 1pt minus 1pt 
  348.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  349.     \itemsep \topsep}
  350.  
  351. \def\@listiv{\leftmargin\leftmarginiv
  352.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  353.  
  354. \def\@listv{\leftmargin\leftmarginv
  355.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  356.  
  357. \def\@listvi{\leftmargin\leftmarginvi
  358.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  359.  
  360.